
// import oimo.dynamics.TimeStep;
// import oimo.dynamics.rigidbody.RigidBody;
// import oimo.dynamics.*;
// import oimo.dynamics.rigidbody.*;

import { RigidBody } from "../rigidbody/RigidBody";
import { TimeStep } from "../TimeStep";

/**
 * The base class of all constarint solvers.
 */

export class ConstraintSolver {
	_b1: RigidBody;
	_b2: RigidBody;
	_addedToIsland: boolean;


	constructor() {
		this._b1 = null;
		this._b2 = null;
		this._addedToIsland = false;
	}

	/**
	 * Prepares for velocity iteration. Time step information `timeStep` is given for
	 * computing time-depending data.
	 */
	public preSolveVelocity(timeStep: TimeStep): void {
	}

	/**
	 * Applies initial impulses.
	 */
	public warmStart(timeStep: TimeStep): void {
	}

	/**
	 * Performs single velocity iteration.
	 */
	public solveVelocity(): void {
	}

	/**
	 * Performs post-processes of velocity part. Time step information `timeStep` is given
	 * for computing time-depending data.
	 */
	public postSolveVelocity(timeStep: TimeStep): void {
	}

	/**
	 * Prepares for position iteration (split impulse or nonlinear Gauss-Seidel). Time step
	 * information `timeStep` is given for computing time-depending data.
	 *
	 * This may not be called depending on position correction algorithm.
	 */
	public preSolvePosition(timeStep: TimeStep): void {
	}

	/**
	 * Performs single position iteration (split impulse)
	 */
	public solvePositionSplitImpulse(): void {
	}

	/**
	 * Performs single position iteration (nonlinear Gauss-Seidel)
	 */
	public solvePositionNgs(timeStep: TimeStep): void {
	}

	/**
	 * Performs post-processes.
	 */
	public postSolve(): void {
	}
}
